package com.efounder.router.intercepter;

import android.content.Context;

import com.alibaba.android.arouter.facade.Postcard;
import com.alibaba.android.arouter.facade.annotation.Interceptor;
import com.alibaba.android.arouter.facade.callback.InterceptorCallback;
import com.alibaba.android.arouter.facade.template.IInterceptor;

/**
 * Arouter拦截器
 *
 * @author Alex <a href="mailto:zhilong.lzl@alibaba-inc.com">Contact me.</a>
 * @version 1.0
 * @since 2017/1/3 11:20
 */
@Interceptor(priority = 10)
public class JFRouterInterceptor implements IInterceptor {

    Context mContext;

    @Override
    public void process(final Postcard postcard, final InterceptorCallback callback) {
//        if (RouterConstant.CHAT_USERINFO_ACTIVITY.equals(postcard.getPath())) {
//
//
//            callback.onInterrupt(null);
//        } else {
//            callback.onContinue(postcard);
//        }

        callback.onContinue(postcard);

    }


    @Override
    public void init(Context context) {
        //    // 拦截器的初始化，会在sdk初始化的时候调用该方法，仅会调用一次
        mContext = context;
    }
}
